<?php
class Default_TopMenu {
   public function TopMenu(){
   		$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
   		$menu = array('home'=>'','product'=>'','huong-dan-mua-hang'=>'','gioi-thieu'=>'');
   		$controller = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
	    $action = Zend_Controller_Front::getInstance()->getRequest()->getActionName();
	    if($controller == 'index')
	    	if($action == 'index')
	    		$menu['home'] = ' active ';
	    if($controller == 'product')
	    	$menu['product'] = ' active ';
	    if($controller == 'article')
	    {
	    	$alias = Zend_Controller_Front::getInstance()->getRequest()->getParam('alias','');
	    	if($alias!='')
	    	{
	    		if($alias != 'gioi-thieu')
	    		{
		    		if($alias == 'huong-dan-mua-hang')
		    		{
		    			$menu['huong-dan-mua-hang'] = ' active ';
		    		}
	    		}
	    		else
	    		{
	    			$menu['gioi-thieu'] = ' active ';
	    		}	    		
	    	}
	    }
		require_once 'views/default.php';
   }
}